//
//  MapTableViewCell.m
//  LiangYa_BObject
//
//  Created by dllo on 15/11/9.
//  Copyright © 2015年 YuHao. All rights reserved.
//

#import "MapTableViewCell.h"

@implementation MapTableViewCell

- (void)awakeFromNib {
    // Initialization code
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.mylabel = [[NightLabel alloc] init];
        [self.contentView addSubview:self.mylabel];
        self.mylabel.font = [UIFont systemFontOfSize:13];
        
        self.mylabel1 = [[NightLabel alloc] init];
        [self.contentView addSubview:self.mylabel1];
        self.mylabel1.numberOfLines = 0;
        self.mylabel1.font = [UIFont systemFontOfSize:13];
        [self.mylabel1 sizeToFit];
        
        self.mybutton = [UIButton buttonWithType:UIButtonTypeSystem];
        [self.contentView addSubview:self.mybutton];
        [self.mybutton setTitle:@"查看地图" forState:UIControlStateNormal];
        [self.mybutton setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
        
        self.myimageview = [[UIImageView alloc] init];
        self.imageView.backgroundColor = [UIColor redColor];
        self.myimageview.image = [UIImage imageNamed:@"dingwei.png"];
        [self.contentView addSubview:self.myimageview];

    }
    
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.backgroundColor = [UIColor clearColor];
    self.mylabel1.frame = CGRectMake(70, 10, cellWidth-170, cellHeight-20);
    self.mylabel.frame = CGRectMake(5, 3, 60, 30);
    self.mybutton.frame = CGRectMake(cellWidth - 75, cellHeight/2-15, 70, 30);
    self.myimageview.frame = CGRectMake(cellWidth - 95, cellHeight/2-10, 20, 20);
  
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
